<template>
	<div>
		<navigationBar :backType="2" :navigationTitle="navigationTitle" />

		<view class="wrap-content">
			<uParse :content="content" />
		</view>
	</div>
</template>

<script>
	import uParse from "@/components/uParse/uParse.vue";
	export default {
		components: {
			uParse,
		},
		data() {
			return {
				navigationTitle: "", // 导航栏标题
				content: "", // 文章内容
			};
		},
		onLoad(options) {
			const index = parseInt(options.index) || 1;
			switch (index) {
				case 1:
					this.navigationTitle = "用户协议";
					this.content = this.$stoarge.getInitData()["UserProtocol"];
					break;
				case 2:
					this.navigationTitle = "隐私政策";
					this.content = this.$stoarge.getInitData()["PrivacyAgreement"];
					break;
				case 3: 
					this.navigationTitle = "服务协议";
					this.content = "<p></p>";
					break;
			}
		},
	};
</script>

<style lang="scss" scoped>
	.wrap-content {
		width: 100%;
		overflow: hidden;
		padding: 30rpx;
		box-sizing: border-box;
		background-color: white;
	}
</style>
